Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Pack dBase .dbf in Java?

29 views
Skip to first unread message

David Kerber

unread,
Mar 4, 2009, 8:45:16 AM3/4/09
to
Does anybody know of a dBase file driver that will allow me to pack a
.dbf from java? I've seen that there are ways using OLEDb from VB (for
example), but haven't seen any equivalent in java.

Any suggestions as to how to accomplish this? I have no trouble with
the sql to select, delete, etc, records from the .dbf, but haven't
figured out how to pack yet.

---
/~\ The ASCII
\ / Ribbon Campaign
X Against HTML
/ \ Email!

Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).

Arne Vajhøj

unread,
Mar 4, 2009, 8:16:41 PM3/4/09
to
David Kerber wrote:
> Does anybody know of a dBase file driver that will allow me to pack a
> .dbf from java? I've seen that there are ways using OLEDb from VB (for
> example), but haven't seen any equivalent in java.
>
> Any suggestions as to how to accomplish this? I have no trouble with
> the sql to select, delete, etc, records from the .dbf, but haven't
> figured out how to pack yet.

If you do it in OLE DB via a SQL command, then you should be able
to do that via JDBC-ODBC bridge and ODBC driver as well.

If not an SQL command then you need a workaround. I can think of two:
1) create a new DBF with same tabel structure and simple copy
all records from the old to the new via JDBC and SQL
2) same as #1 just using java.io classes and methods (the
DBF format is so simple so it is not difficult to do)

Arne


juanma....@gmail.com

unread,
Mar 5, 2009, 5:46:34 AM3/5/09
to
First sorry for my English
you must conect de bdd in ODBC in Control Panel of Windows
next in java you must set a conecction to the odbc
0 new messages